package com.ht.managermentserver.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 字典集合
 *
 * @author czy
 * @since 2020-06-04
 */
@Data

@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "SysDic对象", description = "字典集合")
@JsonIgnoreProperties({"version", "deleted", "createDate", "updateDate", "createId", "updateId"})
public class SysDic extends BaseEntity {

  public static final String ID = "id";
  public static final String DIC_KEY_CODE = "dic_key_code";
  public static final String DIC_KEY_VALUE = "dic_key_value";
  public static final String DIC_TYPE = "dic_type";
  private static final long serialVersionUID = 4207081126079154274L;


  @ApiModelProperty(value = "主键")
  private Long id;


  @ApiModelProperty(value = "字典码")
  private String dicKeyCode;


  @ApiModelProperty(value = "字典名称")
  private String dicKeyValue;

  @ApiModelProperty(value = "字典类型 在字典类型中维护")
  private Integer dicType;


  public SysDic(Long id, String dicKeyCode, String dicKeyValue, Integer dicType) {
    this.id = id;
    this.dicKeyCode = dicKeyCode;
    this.dicKeyValue = dicKeyValue;
    this.dicType = dicType;
  }

  /**
   * 关联字典类型
   */
  @TableField(exist = false)
  private String dicTypeName;

}
